
package Controllers;

/**
 *
 * @author José Portatil
 */
public class ctime {
    
    double[] time = {0.5,1.5,3.0,5.0,1.5};
    double[] price = {5.95,6.0,9.60,22.35,6.7}; 
    double t;
    double p;
    int count = 0;
    
    public ctime(double t, double p) {
        this.t = t;
        this.p = p;
    }
    
    public double calculust(int amount, int type){
        return Math.ceil(amount/100.0)*time[type-1];
    }
    
    public double calculustp(int amount, int type){
        return amount*price[type-1];
    }

    public double getT() {
        return t;
    }

    public double getTp() {
        return p;
        
    }
    public void setT(double t) {
        this.t += t;
    }
    
    public void setTp(double p) {
        this.p += p;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count += count;
    }
    
    
}
